package main

import "fmt"

func main() {

	a := 10

	b := 20

	fmt.Printf("a is %d , b is %d \n", a, b)

	swap(&a, &b)

	fmt.Printf("a is %d , b is %d \n", a, b)

}

func swap(a *int, b *int) {

	fmt.Printf("a is %p , *a is %d \n", a, *a)
	fmt.Printf("b is %p , *b is %d \n", b, *b)

	*a, *b = *b, *a
}
